.color-picker {
  position: absolute;
  z-index: 1000;

  width: 230px;
  height: auto;
  border: #777 solid 1px;

  cursor: default;

  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;

  user-select: none;
  background-color: #fff;
}

.color-picker * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;

  box-sizing: border-box;
  margin: 0;

  font-size: 11px;
}

.color-picker input {
  width: 0;
  height: 26px;
  min-width: 0;

  font-size: 13px;
  text-align: center;
  color: #000;
}

.color-picker input:invalid,
.color-picker input:-moz-ui-invalid,
.color-picker input:-moz-submit-invalid {
  box-shadow: none;
}

.color-picker input::-webkit-inner-spin-button,
.color-picker input::-webkit-outer-spin-button {
  margin: 0;

  -webkit-appearance: none;
}

.color-picker .arrow {
  position: absolute;
  z-index: 999999;

  width: 0;
  height: 0;
  border-style: solid;
}

.color-picker .arrow.arrow-top {
  left: 8px;

  border-width: 10px 5px;
  border-color: #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
}

.color-picker .arrow.arrow-bottom {
  top: -20px;
  left: 8px;

  border-width: 10px 5px;
  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0);
}

.color-picker .arrow.arrow-top-left,
.color-picker .arrow.arrow-left-top {
  right: -21px;
  bottom: 8px;

  border-width: 5px 10px;
  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777;
}

.color-picker .arrow.arrow-top-right,
.color-picker .arrow.arrow-right-top {
  bottom: 8px;
  left: -20px;

  border-width: 5px 10px;
  border-color: rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
}

.color-picker .arrow.arrow-left,
.color-picker .arrow.arrow-left-bottom,
.color-picker .arrow.arrow-bottom-left {
  top: 8px;
  right: -21px;

  border-width: 5px 10px;
  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777;
}

.color-picker .arrow.arrow-right,
.color-picker .arrow.arrow-right-bottom,
.color-picker .arrow.arrow-bottom-right {
  top: 8px;
  left: -20px;

  border-width: 5px 10px;
  border-color: rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
}

.color-picker .cursor {
  position: relative;

  width: 16px;
  height: 16px;
  border: #222 solid 2px;
  border-radius: 50%;

  cursor: default;
}

.color-picker .box {
  display: flex;
  padding: 4px 8px;
}

.color-picker .left {
  position: relative;

  padding: 16px 8px;
}

.color-picker .right {
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;

  flex: 1 1 auto;

  padding: 12px 8px;
}

.color-picker .button-area {
  padding: 0 16px 16px;

  text-align: right;
}

.color-picker .button-area button {
  margin-left: 8px;
}

.color-picker .preset-area {
  padding: 4px 15px;
}

.color-picker .preset-area .preset-label {
  overflow: hidden;
  width: 100%;
  padding: 4px;

  font-size: 11px;
  white-space: nowrap;
  text-align: left;
  text-overflow: ellipsis;
  color: #555;
}

.color-picker .preset-area .preset-color {
  position: relative;

  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 4px 6px 8px;
  border: #a9a9a9 solid 1px;
  border-radius: 25%;

  cursor: pointer;
}

.color-picker .preset-area .preset-empty-message {
  min-height: 18px;
  margin-top: 4px;
  margin-bottom: 8px;

  font-style: italic;
  text-align: center;
}

.color-picker .hex-text {
  width: 100%;
  padding: 4px 8px;

  font-size: 11px;
}

.color-picker .hex-text .box {
  padding: 0 24px 8px 8px;
}

.color-picker .hex-text .box div {
  float: left;

  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;

  flex: 1 1 auto;

  text-align: center;
  color: #555;
  clear: left;
}

.color-picker .hex-text .box input {
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;

  flex: 1 1 auto;
  padding: 1px;
  border: #a9a9a9 solid 1px;
}

.color-picker .hex-alpha .box div:first-child,
.color-picker .hex-alpha .box input:first-child {
  flex-grow: 3;
  margin-right: 8px;
}

.color-picker .cmyk-text,
.color-picker .hsla-text,
.color-picker .rgba-text,
.color-picker .value-text {
  width: 100%;
  padding: 4px 8px;

  font-size: 11px;
}

.color-picker .cmyk-text .box,
.color-picker .hsla-text .box,
.color-picker .rgba-text .box {
  padding: 0 24px 8px 8px;
}

.color-picker .value-text .box {
  padding: 0 8px 8px;
}

.color-picker .cmyk-text .box div,
.color-picker .hsla-text .box div,
.color-picker .rgba-text .box div,
.color-picker .value-text .box div {
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;

  flex: 1 1 auto;
  margin-right: 8px;

  text-align: center;
  color: #555;
}

.color-picker .cmyk-text .box div:last-child,
.color-picker .hsla-text .box div:last-child,
.color-picker .rgba-text .box div:last-child,
.color-picker .value-text .box div:last-child {
  margin-right: 0;
}

.color-picker .cmyk-text .box input,
.color-picker .hsla-text .box input,
.color-picker .rgba-text .box input,
.color-picker .value-text .box input {
  float: left;

  -webkit-flex: 1;
  -ms-flex: 1;

  flex: 1;
  padding: 1px;
  margin: 0 8px 0 0;
  border: #a9a9a9 solid 1px;
}

.color-picker .cmyk-text .box input:last-child,
.color-picker .hsla-text .box input:last-child,
.color-picker .rgba-text .box input:last-child,
.color-picker .value-text .box input:last-child {
  margin-right: 0;
}

.color-picker .hue-alpha {
  align-items: center;
  margin-bottom: 3px;
}

.color-picker .hue {
  direction: ltr;

  width: 100%;
  height: 16px;
  margin-bottom: 16px;
  border: none;

  cursor: pointer;
  background-size: 100% 100%;
  background-image: url('');
}

.color-picker .value {
  direction: rtl;

  width: 100%;
  height: 16px;
  margin-bottom: 16px;
  border: none;

  cursor: pointer;
  background-size: 100% 100%;
  background-image: url('');
}

.color-picker .alpha {
  direction: ltr;

  width: 100%;
  height: 16px;
  border: none;

  cursor: pointer;
  background-size: 100% 100%;
  background-image: url('');
}

.color-picker .type-policy {
  position: absolute;
  top: 218px;
  right: 12px;

  width: 16px;
  height: 24px;

  background-size: 8px 16px;
  background-image: url('');
  background-repeat: no-repeat;
  background-position: center;
}

.color-picker .type-policy .type-policy-arrow {
  display: block;

  width: 100%;
  height: 50%;
}

.color-picker .selected-color {
  position: absolute;
  top: 16px;
  left: 8px;

  width: 40px;
  height: 40px;
  border: 1px solid #a9a9a9;
  border-radius: 50%;
}

.color-picker .selected-color-background {
  width: 40px;
  height: 40px;
  border-radius: 50%;

  background-image: url('');
}

.color-picker .saturation-lightness {
  direction: ltr;

  width: 100%;
  height: 130px;
  border: none;

  cursor: pointer;
  touch-action: manipulation;
  background-size: 100% 100%;
  background-image: url('');
}

.color-picker .cp-add-color-button-class {
  position: absolute;

  display: inline;
  padding: 0;
  margin: 3px -3px;
  border: 0;

  cursor: pointer;
  background: transparent;
}

.color-picker .cp-add-color-button-class:hover {
  text-decoration: underline;
}

.color-picker .cp-add-color-button-class:disabled {
  cursor: not-allowed;
  color: #999;
}

.color-picker .cp-add-color-button-class:disabled:hover {
  text-decoration: none;
}

.color-picker .cp-remove-color-button-class {
  position: absolute;
  top: -5px;
  right: -5px;

  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;

  cursor: pointer;
  text-align: center;
  background: #fff;

  box-shadow: 1px 1px 5px #333;
}

.color-picker .cp-remove-color-button-class::before {
  content: 'x';

  position: relative;
  bottom: 3.5px;

  display: inline-block;

  font-size: 10px;
}
